package com.sudu.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("评论实体类")
@TableName("t_comment")
public class Comment {
    @ApiModelProperty("评论id")
    private  Integer comId;
    @ApiModelProperty("评论创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd hh:mm:ss" , timezone="GMT+8")
    private Date createTime ;
    @ApiModelProperty("逻辑删除")
    private int isDelete ;
    @ApiModelProperty("评论内容")
    private String content ;
    @ApiModelProperty("视频id")
    private int videoId ;
    @ApiModelProperty("父评论")
    private int parentId ;

    // 用户信息
    @ApiModelProperty("用户头像")
    private String userImg ;
    @ApiModelProperty("用户昵称")
    private String username;
    @ApiModelProperty("用户id")
    private int userId ;
    //回复评论
    private List<Comment> replyComments = new ArrayList<>();
    private Comment parentComment;
    private String parentNickname;

}
